home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet 2002 February / Practical Internet February 2002.iso / pc / Software / Browsing / httrack-3.09e2.exe / {app} / src_win / WinHTTrack / Shell.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-07  |  5.2 KB  |  211 lines

  1. // Shell.h : main header file for the SHELL application
  2. //
  3.  
  4. #if !defined(AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_)
  5. #define AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #ifndef __AFXWIN_H__
  10.     #error include 'stdafx.h' before including this file for PCH
  11. #endif
  12.  
  13. /* basic HTTrack defs */
  14. #include "htsglobal.h"
  15. #include "htsopt.h"
  16.  
  17. // Site actuel de HTTrack
  18. #define HTTRACK_WEB "http://www.httrack.com"
  19.  
  20. //
  21. // connectΘ via HTTrack? (dΘfini dans projet)
  22. #define USE_RAS 1
  23. //
  24.  
  25. // sleep (taux de refresh) en ms
  26. #define HTS_SLEEP_WIN 100
  27.  
  28. #include "resource.h"       // main symbols
  29. #include "cpp_lang.h"
  30. // Ras
  31. #if USE_RAS
  32. #include "RasLoad.h"
  33. #endif
  34. #include "MainTab.h"
  35.  
  36. // helper launcher
  37. #include "LaunchHelp.h"
  38.  
  39. // lang.h
  40. #include "newlang.h"
  41.  
  42. // message requests
  43. #define wm_ViewRestart (WM_USER + 100)
  44. // test 
  45. #define wm_WizRequest1 (WM_USER + 101)
  46. #define wm_WizRequest2 (WM_USER + 102)
  47. #define wm_WizRequest3 (WM_USER + 103)
  48.  
  49. // char[] dynamiques
  50. #define dynstrcpy(dest,src) { \
  51.   if (dest) free(dest);\
  52.   dest=(char*) malloc(strlen(src)+1);\
  53.   if (dest)\
  54.     strcpy(dest,src);\
  55.   }
  56. #define dynclear(dest) { if (dest) { free(dest); dest=NULL; }}
  57.  
  58. typedef struct {
  59.   char nom[1000];
  60.   char fichier[256];
  61.   char etat[20];
  62.   char url_sav[HTS_URLMAXSIZE*2];    // pour cancel
  63.   char url_adr[HTS_URLMAXSIZE*2];
  64.   char url_fil[HTS_URLMAXSIZE*2];
  65.   LLint size;
  66.   LLint sizetot;
  67.   int offset;
  68.   //
  69.   int back;
  70.   //
  71.   int actived;    // pour disabled
  72. } t_StatsBuffer;
  73.  
  74. typedef struct {
  75.   int ask_refresh;
  76.   int refresh;
  77.   LLint stat_bytes;
  78.   int stat_time;
  79.   int lien_n;
  80.   int lien_tot;
  81.   int stat_nsocket;
  82.   int rate;
  83.   int irate;
  84.   int ft;
  85.   LLint stat_written;
  86.   int stat_updated;
  87.   int stat_errors;
  88.   TStamp stat_timestart;
  89.   int stat_back;
  90. } InpInfo;
  91.  
  92.  
  93. // fonctions moteur
  94. int   __cdecl httrackengine_check(char* adr,char* fil,int status);
  95. void  __cdecl httrackengine_init();
  96. void  __cdecl httrackengine_uninit();
  97. int   __cdecl httrackengine_start(void* dummy);
  98. int   __cdecl httrackengine_end();
  99. int   __cdecl httrackengine_htmlcheck(char* html,int len,char* url_adresse,char* url_fichier);
  100. int   __cdecl httrackengine_chopt(void* opt);
  101. int   __cdecl httrackengine_loop(void* _back,int back_max,int back_index,int lien_n,int lien_tot,int stat_time,hts_stat_struct* stats);
  102. char* __cdecl httrackengine_query(char* question);
  103. char* __cdecl httrackengine_query2(char* question);
  104. char* __cdecl httrackengine_query3(char* question);
  105. void  __cdecl httrackengine_pause(char* lockfile);
  106.  
  107.  
  108. // profile
  109. int Save_current_profile(int ask);
  110. //
  111. int MyGetProfileInt(CString path,CString dummy,CString name,int value);
  112. int MyGetProfileIntFile(FILE* fp,CString dummy,CString name,int value);
  113. int MyWriteProfileString(CString path,CString dummy,CString name,CString value);
  114. int MyWriteProfileStringFile(FILE* fp,CString dummy,CString name,CString value);
  115. CString MyGetProfileStringFile(FILE* fp,CString dummy,CString name,CString value);
  116. CString MyGetProfileString(CString path,CString dummy,CString name,CString value="");
  117. void Write_profile(CString path,int load_path);
  118. void Read_profile(CString path,int load_path);
  119. int MyWriteProfileInt(CString path,CString dummy,CString name,int value);
  120. int MyWriteProfileIntFile(FILE* fp,CString dummy,CString name,int value);
  121.  
  122. void Build_TopIndex(BOOL check_empty=TRUE);
  123.  
  124. void InitRAS();
  125.  
  126. // Gestion rΘpertoires
  127. int CheckDirInfo(CString path);
  128. BOOL RemoveEmptyDir(CString path);
  129.  
  130.  
  131. // RAS //
  132. /*
  133. #include "Ras.h"
  134. typedef unsigned long (* t_RasHangUp)(HRASCONN);
  135. */
  136. // RAS END //
  137.  
  138. /* lang extensions */
  139. void SetCombo(CWnd* _this,int id,char* lang_string);
  140.  
  141.  
  142. // HTTrack params - pour le multithread interface/robot
  143. class HTTrack_Params {
  144. public:
  145.   int argc;
  146.   char** argv;
  147.   //
  148.   int* result;
  149. };
  150. typedef struct {
  151.   int argc;
  152.   char** argv;
  153. } Robot_params;
  154.  
  155. // Lancement du miroir
  156. BOOL LaunchMirror();
  157.  
  158.  
  159. #define NStatsBuffer                    14
  160.  
  161.  
  162. /////////////////////////////////////////////////////////////////////////////
  163. // CShellApp:
  164. // See Shell.cpp for the implementation of this class
  165. //
  166. //class CShellApp : public CWinApp
  167. class CShellApp
  168. {
  169. public:
  170.     CShellApp();
  171.   void init_lance();
  172.   CString end_path;
  173.   CString end_path_complete;
  174.   /*
  175.   int suivant0(void);
  176.   int suivant1(void);
  177.   int suivant2(void);
  178.   //int suivant3(void);
  179.   int suivant4(void);
  180.   */
  181.   void OptPannel();
  182.  
  183.   //BOOL InitInstance();
  184.   
  185.   /*
  186. // Overrides
  187.     // ClassWizard generated virtual function overrides
  188.     //{{AFX_VIRTUAL(CShellApp)
  189.     public:
  190.     virtual BOOL InitInstance();
  191.     //}}AFX_VIRTUAL
  192.  
  193. // Implementation
  194.  
  195.     //{{AFX_MSG(CShellApp)
  196.     afx_msg void OnAppAbout();
  197.         // NOTE - the ClassWizard will add and remove member functions here.
  198.         //    DO NOT EDIT what you see in these blocks of generated code !
  199.     //}}AFX_MSG
  200.     DECLARE_MESSAGE_MAP()
  201.   */
  202. };
  203.  
  204.  
  205. /////////////////////////////////////////////////////////////////////////////
  206.  
  207. //{{AFX_INSERT_LOCATION}}
  208. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  209.  
  210. #endif // !defined(AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_)
  211.